from datetime import datetime


class dec:

    def __init__(self, func):
        func.extra_data = 'added by class decorator'
        self.func = func

    def __call__(self, *args, **kargs):
        print(self.func.extra_data)
        return self.func(*args, **kargs)


@dec
def add(num1, num2):
    return num1 + num2


print(add(1, 2))
